#ifndef TYPE_H_
#define TYPE_H_
#include <string>
#include <iostream>
using namespace std;

class Type
{
private:
	string maintype;
	string subtype;

public:
	Type() {};
	Type(string _maintype, string _subtype): maintype(_maintype), subtype(_subtype) {};

	/* Obtains the type's maintype.
	 * @return the maintype of the type */
	string getMaintype() const { return maintype; }
	/* Obtains the type's subtype.
	 * @return the subtype of the type */
	string getSubtype() const { return subtype; }

	/** Sets maintype equal to _maintype */
	void setMaintype(string _maintype) { maintype = _maintype; }

	/** Sets subtype equal to _subtype */
	void setSubtype(string _subtype) { subtype = _subtype; }

	/** shows the maintype and the subtype */
	void showType();

	/** returns true if the maintype of
	 * the object is the same as the
	 * maintype of the object given */
	bool equalMaintype(Type _type);

	/** returns true if the subtype of
	 * the object is the same as the
	 * subtype of the object given */
	bool equalSubtype(Type _type);

	/**
	 * operator == overload to compare the type's mainType and subType with type2's mainType and subType
	 */
	bool operator==(const Type & type2) const;

	/**
	 * operator < overload to compare the type's mainType and subType with type2's mainType and subType
	 */
	bool operator< (const Type & type2) const;
};



#endif /* TYPE_H_ */
